<?php

class Core_Backend_Component_Global_Controller_Component extends Dcmp_Component_Controller {

    public function indexAction($int_pageindex = 1, $int_pagesize = 20) {
        $list = App::getModel('global/collection_component')->joinAccount()->load(array(), $int_pageindex, $int_pagesize);
        $records = $list->loadCount();
        return $this->viewResult(array('list' => $list, 'records' => $records));
    }

    public function installAction(){
        return $this->viewResult();
    }

    public function installPostAction(){
        $data = $this->getRequest()->getForm('website');
        $model = App::getModel('global/component');
        $model->addData($data)->setCreatorId(Kd_Web::getIdentity()->getId());
    }
}